# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=mauikit-texteditor
pkgver=2.1.2
pkgrel=0
pkgdesc="MauiKit Text Editor components"
# armhf blocked by qt5-qtdeclarative
# s390x and riscv64 blocked by mauikit
arch="all !armhf !s390x !riscv64"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="kirigami2"
makedepends="
	extra-cmake-modules
	kcoreaddons-dev
	ki18n-dev
	syntax-highlighting-dev
	mauikit
	mauikit-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	samurai
	"
source="https://download.kde.org/stable/maui/mauikit-texteditor/$pkgver/mauikit-texteditor-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
80a1b337d6a77f4a92d759e693d5c658f3fee008c87d821c812364ba20922a4dcafb5c90beb82870deda4b5f26cfc32d3fdae3b6e6b55bbc75a42e4c955d6a6f  mauikit-texteditor-2.1.2.tar.xz
"
